/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.vportal.portlet.edirectory.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.util.PortalUtil;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import com.vportal.portlet.edirectory.model.EDEmployee;
import com.vportal.portlet.edirectory.model.EDEmployeeModel;
import com.vportal.portlet.edirectory.model.EDEmployeeSoap;

import java.io.Serializable;

import java.sql.Types;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * The base model implementation for the EDEmployee service. Represents a row in the &quot;EDEmployee&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link com.vportal.portlet.edirectory.model.EDEmployeeModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link EDEmployeeImpl}.
 * </p>
 *
 * @author HOAN
 * @see EDEmployeeImpl
 * @see com.vportal.portlet.edirectory.model.EDEmployee
 * @see com.vportal.portlet.edirectory.model.EDEmployeeModel
 * @generated
 */
@JSON(strict = true)
public class EDEmployeeModelImpl extends BaseModelImpl<EDEmployee>
	implements EDEmployeeModel {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this class directly. All methods that expect a e d employee model instance should use the {@link com.vportal.portlet.edirectory.model.EDEmployee} interface instead.
	 */
	public static final String TABLE_NAME = "EDEmployee";
	public static final Object[][] TABLE_COLUMNS = {
			{ "uuid_", Types.VARCHAR },
			{ "id_", Types.BIGINT },
			{ "createdDate", Types.TIMESTAMP },
			{ "modifiedDate", Types.TIMESTAMP },
			{ "title", Types.VARCHAR },
			{ "name", Types.VARCHAR },
			{ "birthday", Types.TIMESTAMP },
			{ "homeSide", Types.VARCHAR },
			{ "family", Types.VARCHAR },
			{ "race", Types.VARCHAR },
			{ "home", Types.VARCHAR },
			{ "homePhone", Types.VARCHAR },
			{ "workPhone", Types.VARCHAR },
			{ "mobilePhone", Types.VARCHAR },
			{ "email", Types.VARCHAR },
			{ "departmentId", Types.BIGINT },
			{ "majorLevel", Types.VARCHAR },
			{ "philosophism", Types.VARCHAR },
			{ "foreignLanguage", Types.VARCHAR },
			{ "joinDate", Types.TIMESTAMP },
			{ "image", Types.VARCHAR },
			{ "isShowTree", Types.BOOLEAN },
			{ "otherInfo", Types.VARCHAR },
			{ "companyId", Types.BIGINT },
			{ "groupId", Types.BIGINT },
			{ "userId", Types.BIGINT },
			{ "languageId", Types.VARCHAR },
			{ "displayOrder", Types.BIGINT },
			{ "sex", Types.VARCHAR },
			{ "status", Types.BIGINT },
			{ "show", Types.VARCHAR }
		};
	public static final String TABLE_SQL_CREATE = "create table EDEmployee (uuid_ VARCHAR(75) null,id_ LONG not null primary key,createdDate DATE null,modifiedDate DATE null,title VARCHAR(75) null,name VARCHAR(500) null,birthday DATE null,homeSide VARCHAR(500) null,family VARCHAR(500) null,race VARCHAR(500) null,home VARCHAR(500) null,homePhone VARCHAR(500) null,workPhone VARCHAR(500) null,mobilePhone VARCHAR(500) null,email VARCHAR(500) null,departmentId LONG,majorLevel VARCHAR(500) null,philosophism VARCHAR(500) null,foreignLanguage VARCHAR(500) null,joinDate DATE null,image VARCHAR(500) null,isShowTree BOOLEAN,otherInfo VARCHAR(1000) null,companyId LONG,groupId LONG,userId LONG,languageId VARCHAR(75) null,displayOrder LONG,sex VARCHAR(75) null,status LONG,show VARCHAR(150) null)";
	public static final String TABLE_SQL_DROP = "drop table EDEmployee";
	public static final String ORDER_BY_JPQL = " ORDER BY edEmployee.displayOrder ASC";
	public static final String ORDER_BY_SQL = " ORDER BY EDEmployee.displayOrder ASC";
	public static final String DATA_SOURCE = "liferayDataSource";
	public static final String SESSION_FACTORY = "liferaySessionFactory";
	public static final String TX_MANAGER = "liferayTransactionManager";
	public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.entity.cache.enabled.com.vportal.portlet.edirectory.model.EDEmployee"),
			true);
	public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.finder.cache.enabled.com.vportal.portlet.edirectory.model.EDEmployee"),
			true);
	public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.column.bitmask.enabled.com.vportal.portlet.edirectory.model.EDEmployee"),
			true);
	public static long DEPARTMENTID_COLUMN_BITMASK = 1L;
	public static long GROUPID_COLUMN_BITMASK = 2L;
	public static long ID_COLUMN_BITMASK = 4L;
	public static long ISSHOWTREE_COLUMN_BITMASK = 8L;
	public static long LANGUAGEID_COLUMN_BITMASK = 16L;
	public static long STATUS_COLUMN_BITMASK = 32L;
	public static long UUID_COLUMN_BITMASK = 64L;

	/**
	 * Converts the soap model instance into a normal model instance.
	 *
	 * @param soapModel the soap model instance to convert
	 * @return the normal model instance
	 */
	public static EDEmployee toModel(EDEmployeeSoap soapModel) {
		EDEmployee model = new EDEmployeeImpl();

		model.setUuid(soapModel.getUuid());
		model.setId(soapModel.getId());
		model.setCreatedDate(soapModel.getCreatedDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setTitle(soapModel.getTitle());
		model.setName(soapModel.getName());
		model.setBirthday(soapModel.getBirthday());
		model.setHomeSide(soapModel.getHomeSide());
		model.setFamily(soapModel.getFamily());
		model.setRace(soapModel.getRace());
		model.setHome(soapModel.getHome());
		model.setHomePhone(soapModel.getHomePhone());
		model.setWorkPhone(soapModel.getWorkPhone());
		model.setMobilePhone(soapModel.getMobilePhone());
		model.setEmail(soapModel.getEmail());
		model.setDepartmentId(soapModel.getDepartmentId());
		model.setMajorLevel(soapModel.getMajorLevel());
		model.setPhilosophism(soapModel.getPhilosophism());
		model.setForeignLanguage(soapModel.getForeignLanguage());
		model.setJoinDate(soapModel.getJoinDate());
		model.setImage(soapModel.getImage());
		model.setIsShowTree(soapModel.getIsShowTree());
		model.setOtherInfo(soapModel.getOtherInfo());
		model.setCompanyId(soapModel.getCompanyId());
		model.setGroupId(soapModel.getGroupId());
		model.setUserId(soapModel.getUserId());
		model.setLanguageId(soapModel.getLanguageId());
		model.setDisplayOrder(soapModel.getDisplayOrder());
		model.setSex(soapModel.getSex());
		model.setStatus(soapModel.getStatus());
		model.setShow(soapModel.getShow());

		return model;
	}

	/**
	 * Converts the soap model instances into normal model instances.
	 *
	 * @param soapModels the soap model instances to convert
	 * @return the normal model instances
	 */
	public static List<EDEmployee> toModels(EDEmployeeSoap[] soapModels) {
		List<EDEmployee> models = new ArrayList<EDEmployee>(soapModels.length);

		for (EDEmployeeSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}

	public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
				"lock.expiration.time.com.vportal.portlet.edirectory.model.EDEmployee"));

	public EDEmployeeModelImpl() {
	}

	public long getPrimaryKey() {
		return _id;
	}

	public void setPrimaryKey(long primaryKey) {
		setId(primaryKey);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_id);
	}

	public void setPrimaryKeyObj(Serializable primaryKeyObj) {
		setPrimaryKey(((Long)primaryKeyObj).longValue());
	}

	public Class<?> getModelClass() {
		return EDEmployee.class;
	}

	public String getModelClassName() {
		return EDEmployee.class.getName();
	}

	@JSON
	public String getUuid() {
		if (_uuid == null) {
			return StringPool.BLANK;
		}
		else {
			return _uuid;
		}
	}

	public void setUuid(String uuid) {
		if (_originalUuid == null) {
			_originalUuid = _uuid;
		}

		_uuid = uuid;
	}

	public String getOriginalUuid() {
		return GetterUtil.getString(_originalUuid);
	}

	@JSON
	public long getId() {
		return _id;
	}

	public void setId(long id) {
		_columnBitmask |= ID_COLUMN_BITMASK;

		if (!_setOriginalId) {
			_setOriginalId = true;

			_originalId = _id;
		}

		_id = id;
	}

	public long getOriginalId() {
		return _originalId;
	}

	@JSON
	public Date getCreatedDate() {
		return _createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		_createdDate = createdDate;
	}

	@JSON
	public Date getModifiedDate() {
		return _modifiedDate;
	}

	public void setModifiedDate(Date modifiedDate) {
		_modifiedDate = modifiedDate;
	}

	@JSON
	public String getTitle() {
		if (_title == null) {
			return StringPool.BLANK;
		}
		else {
			return _title;
		}
	}

	public void setTitle(String title) {
		_title = title;
	}

	@JSON
	public String getName() {
		if (_name == null) {
			return StringPool.BLANK;
		}
		else {
			return _name;
		}
	}

	public void setName(String name) {
		_name = name;
	}

	@JSON
	public Date getBirthday() {
		return _birthday;
	}

	public void setBirthday(Date birthday) {
		_birthday = birthday;
	}

	@JSON
	public String getHomeSide() {
		if (_homeSide == null) {
			return StringPool.BLANK;
		}
		else {
			return _homeSide;
		}
	}

	public void setHomeSide(String homeSide) {
		_homeSide = homeSide;
	}

	@JSON
	public String getFamily() {
		if (_family == null) {
			return StringPool.BLANK;
		}
		else {
			return _family;
		}
	}

	public void setFamily(String family) {
		_family = family;
	}

	@JSON
	public String getRace() {
		if (_race == null) {
			return StringPool.BLANK;
		}
		else {
			return _race;
		}
	}

	public void setRace(String race) {
		_race = race;
	}

	@JSON
	public String getHome() {
		if (_home == null) {
			return StringPool.BLANK;
		}
		else {
			return _home;
		}
	}

	public void setHome(String home) {
		_home = home;
	}

	@JSON
	public String getHomePhone() {
		if (_homePhone == null) {
			return StringPool.BLANK;
		}
		else {
			return _homePhone;
		}
	}

	public void setHomePhone(String homePhone) {
		_homePhone = homePhone;
	}

	@JSON
	public String getWorkPhone() {
		if (_workPhone == null) {
			return StringPool.BLANK;
		}
		else {
			return _workPhone;
		}
	}

	public void setWorkPhone(String workPhone) {
		_workPhone = workPhone;
	}

	@JSON
	public String getMobilePhone() {
		if (_mobilePhone == null) {
			return StringPool.BLANK;
		}
		else {
			return _mobilePhone;
		}
	}

	public void setMobilePhone(String mobilePhone) {
		_mobilePhone = mobilePhone;
	}

	@JSON
	public String getEmail() {
		if (_email == null) {
			return StringPool.BLANK;
		}
		else {
			return _email;
		}
	}

	public void setEmail(String email) {
		_email = email;
	}

	@JSON
	public long getDepartmentId() {
		return _departmentId;
	}

	public void setDepartmentId(long departmentId) {
		_columnBitmask |= DEPARTMENTID_COLUMN_BITMASK;

		if (!_setOriginalDepartmentId) {
			_setOriginalDepartmentId = true;

			_originalDepartmentId = _departmentId;
		}

		_departmentId = departmentId;
	}

	public long getOriginalDepartmentId() {
		return _originalDepartmentId;
	}

	@JSON
	public String getMajorLevel() {
		if (_majorLevel == null) {
			return StringPool.BLANK;
		}
		else {
			return _majorLevel;
		}
	}

	public void setMajorLevel(String majorLevel) {
		_majorLevel = majorLevel;
	}

	@JSON
	public String getPhilosophism() {
		if (_philosophism == null) {
			return StringPool.BLANK;
		}
		else {
			return _philosophism;
		}
	}

	public void setPhilosophism(String philosophism) {
		_philosophism = philosophism;
	}

	@JSON
	public String getForeignLanguage() {
		if (_foreignLanguage == null) {
			return StringPool.BLANK;
		}
		else {
			return _foreignLanguage;
		}
	}

	public void setForeignLanguage(String foreignLanguage) {
		_foreignLanguage = foreignLanguage;
	}

	@JSON
	public Date getJoinDate() {
		return _joinDate;
	}

	public void setJoinDate(Date joinDate) {
		_joinDate = joinDate;
	}

	@JSON
	public String getImage() {
		if (_image == null) {
			return StringPool.BLANK;
		}
		else {
			return _image;
		}
	}

	public void setImage(String image) {
		_image = image;
	}

	@JSON
	public boolean getIsShowTree() {
		return _isShowTree;
	}

	public boolean isIsShowTree() {
		return _isShowTree;
	}

	public void setIsShowTree(boolean isShowTree) {
		_columnBitmask |= ISSHOWTREE_COLUMN_BITMASK;

		if (!_setOriginalIsShowTree) {
			_setOriginalIsShowTree = true;

			_originalIsShowTree = _isShowTree;
		}

		_isShowTree = isShowTree;
	}

	public boolean getOriginalIsShowTree() {
		return _originalIsShowTree;
	}

	@JSON
	public String getOtherInfo() {
		if (_otherInfo == null) {
			return StringPool.BLANK;
		}
		else {
			return _otherInfo;
		}
	}

	public void setOtherInfo(String otherInfo) {
		_otherInfo = otherInfo;
	}

	@JSON
	public long getCompanyId() {
		return _companyId;
	}

	public void setCompanyId(long companyId) {
		_companyId = companyId;
	}

	@JSON
	public long getGroupId() {
		return _groupId;
	}

	public void setGroupId(long groupId) {
		_columnBitmask |= GROUPID_COLUMN_BITMASK;

		if (!_setOriginalGroupId) {
			_setOriginalGroupId = true;

			_originalGroupId = _groupId;
		}

		_groupId = groupId;
	}

	public long getOriginalGroupId() {
		return _originalGroupId;
	}

	@JSON
	public long getUserId() {
		return _userId;
	}

	public void setUserId(long userId) {
		_userId = userId;
	}

	public String getUserUuid() throws SystemException {
		return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
	}

	public void setUserUuid(String userUuid) {
		_userUuid = userUuid;
	}

	@JSON
	public String getLanguageId() {
		if (_languageId == null) {
			return StringPool.BLANK;
		}
		else {
			return _languageId;
		}
	}

	public void setLanguageId(String languageId) {
		_columnBitmask |= LANGUAGEID_COLUMN_BITMASK;

		if (_originalLanguageId == null) {
			_originalLanguageId = _languageId;
		}

		_languageId = languageId;
	}

	public String getOriginalLanguageId() {
		return GetterUtil.getString(_originalLanguageId);
	}

	@JSON
	public long getDisplayOrder() {
		return _displayOrder;
	}

	public void setDisplayOrder(long displayOrder) {
		_columnBitmask = -1L;

		_displayOrder = displayOrder;
	}

	@JSON
	public String getSex() {
		if (_sex == null) {
			return StringPool.BLANK;
		}
		else {
			return _sex;
		}
	}

	public void setSex(String sex) {
		_sex = sex;
	}

	@JSON
	public long getStatus() {
		return _status;
	}

	public void setStatus(long status) {
		_columnBitmask |= STATUS_COLUMN_BITMASK;

		if (!_setOriginalStatus) {
			_setOriginalStatus = true;

			_originalStatus = _status;
		}

		_status = status;
	}

	public long getOriginalStatus() {
		return _originalStatus;
	}

	@JSON
	public String getShow() {
		if (_show == null) {
			return StringPool.BLANK;
		}
		else {
			return _show;
		}
	}

	public void setShow(String show) {
		_show = show;
	}

	public long getColumnBitmask() {
		return _columnBitmask;
	}

	@Override
	public EDEmployee toEscapedModel() {
		if (_escapedModelProxy == null) {
			_escapedModelProxy = (EDEmployee)ProxyUtil.newProxyInstance(_classLoader,
					_escapedModelProxyInterfaces,
					new AutoEscapeBeanHandler(this));
		}

		return _escapedModelProxy;
	}

	@Override
	public ExpandoBridge getExpandoBridge() {
		if (_expandoBridge == null) {
			_expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
					EDEmployee.class.getName(), getPrimaryKey());
		}

		return _expandoBridge;
	}

	@Override
	public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
		getExpandoBridge().setAttributes(serviceContext);
	}

	@Override
	public Object clone() {
		EDEmployeeImpl edEmployeeImpl = new EDEmployeeImpl();

		edEmployeeImpl.setUuid(getUuid());
		edEmployeeImpl.setId(getId());
		edEmployeeImpl.setCreatedDate(getCreatedDate());
		edEmployeeImpl.setModifiedDate(getModifiedDate());
		edEmployeeImpl.setTitle(getTitle());
		edEmployeeImpl.setName(getName());
		edEmployeeImpl.setBirthday(getBirthday());
		edEmployeeImpl.setHomeSide(getHomeSide());
		edEmployeeImpl.setFamily(getFamily());
		edEmployeeImpl.setRace(getRace());
		edEmployeeImpl.setHome(getHome());
		edEmployeeImpl.setHomePhone(getHomePhone());
		edEmployeeImpl.setWorkPhone(getWorkPhone());
		edEmployeeImpl.setMobilePhone(getMobilePhone());
		edEmployeeImpl.setEmail(getEmail());
		edEmployeeImpl.setDepartmentId(getDepartmentId());
		edEmployeeImpl.setMajorLevel(getMajorLevel());
		edEmployeeImpl.setPhilosophism(getPhilosophism());
		edEmployeeImpl.setForeignLanguage(getForeignLanguage());
		edEmployeeImpl.setJoinDate(getJoinDate());
		edEmployeeImpl.setImage(getImage());
		edEmployeeImpl.setIsShowTree(getIsShowTree());
		edEmployeeImpl.setOtherInfo(getOtherInfo());
		edEmployeeImpl.setCompanyId(getCompanyId());
		edEmployeeImpl.setGroupId(getGroupId());
		edEmployeeImpl.setUserId(getUserId());
		edEmployeeImpl.setLanguageId(getLanguageId());
		edEmployeeImpl.setDisplayOrder(getDisplayOrder());
		edEmployeeImpl.setSex(getSex());
		edEmployeeImpl.setStatus(getStatus());
		edEmployeeImpl.setShow(getShow());

		edEmployeeImpl.resetOriginalValues();

		return edEmployeeImpl;
	}

	public int compareTo(EDEmployee edEmployee) {
		int value = 0;

		if (getDisplayOrder() < edEmployee.getDisplayOrder()) {
			value = -1;
		}
		else if (getDisplayOrder() > edEmployee.getDisplayOrder()) {
			value = 1;
		}
		else {
			value = 0;
		}

		if (value != 0) {
			return value;
		}

		return 0;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		EDEmployee edEmployee = null;

		try {
			edEmployee = (EDEmployee)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		long primaryKey = edEmployee.getPrimaryKey();

		if (getPrimaryKey() == primaryKey) {
			return true;
		}
		else {
			return false;
		}
	}

	@Override
	public int hashCode() {
		return (int)getPrimaryKey();
	}

	@Override
	public void resetOriginalValues() {
		EDEmployeeModelImpl edEmployeeModelImpl = this;

		edEmployeeModelImpl._originalUuid = edEmployeeModelImpl._uuid;

		edEmployeeModelImpl._originalId = edEmployeeModelImpl._id;

		edEmployeeModelImpl._setOriginalId = false;

		edEmployeeModelImpl._originalDepartmentId = edEmployeeModelImpl._departmentId;

		edEmployeeModelImpl._setOriginalDepartmentId = false;

		edEmployeeModelImpl._originalIsShowTree = edEmployeeModelImpl._isShowTree;

		edEmployeeModelImpl._setOriginalIsShowTree = false;

		edEmployeeModelImpl._originalGroupId = edEmployeeModelImpl._groupId;

		edEmployeeModelImpl._setOriginalGroupId = false;

		edEmployeeModelImpl._originalLanguageId = edEmployeeModelImpl._languageId;

		edEmployeeModelImpl._originalStatus = edEmployeeModelImpl._status;

		edEmployeeModelImpl._setOriginalStatus = false;

		edEmployeeModelImpl._columnBitmask = 0;
	}

	@Override
	public CacheModel<EDEmployee> toCacheModel() {
		EDEmployeeCacheModel edEmployeeCacheModel = new EDEmployeeCacheModel();

		edEmployeeCacheModel.uuid = getUuid();

		String uuid = edEmployeeCacheModel.uuid;

		if ((uuid != null) && (uuid.length() == 0)) {
			edEmployeeCacheModel.uuid = null;
		}

		edEmployeeCacheModel.id = getId();

		Date createdDate = getCreatedDate();

		if (createdDate != null) {
			edEmployeeCacheModel.createdDate = createdDate.getTime();
		}
		else {
			edEmployeeCacheModel.createdDate = Long.MIN_VALUE;
		}

		Date modifiedDate = getModifiedDate();

		if (modifiedDate != null) {
			edEmployeeCacheModel.modifiedDate = modifiedDate.getTime();
		}
		else {
			edEmployeeCacheModel.modifiedDate = Long.MIN_VALUE;
		}

		edEmployeeCacheModel.title = getTitle();

		String title = edEmployeeCacheModel.title;

		if ((title != null) && (title.length() == 0)) {
			edEmployeeCacheModel.title = null;
		}

		edEmployeeCacheModel.name = getName();

		String name = edEmployeeCacheModel.name;

		if ((name != null) && (name.length() == 0)) {
			edEmployeeCacheModel.name = null;
		}

		Date birthday = getBirthday();

		if (birthday != null) {
			edEmployeeCacheModel.birthday = birthday.getTime();
		}
		else {
			edEmployeeCacheModel.birthday = Long.MIN_VALUE;
		}

		edEmployeeCacheModel.homeSide = getHomeSide();

		String homeSide = edEmployeeCacheModel.homeSide;

		if ((homeSide != null) && (homeSide.length() == 0)) {
			edEmployeeCacheModel.homeSide = null;
		}

		edEmployeeCacheModel.family = getFamily();

		String family = edEmployeeCacheModel.family;

		if ((family != null) && (family.length() == 0)) {
			edEmployeeCacheModel.family = null;
		}

		edEmployeeCacheModel.race = getRace();

		String race = edEmployeeCacheModel.race;

		if ((race != null) && (race.length() == 0)) {
			edEmployeeCacheModel.race = null;
		}

		edEmployeeCacheModel.home = getHome();

		String home = edEmployeeCacheModel.home;

		if ((home != null) && (home.length() == 0)) {
			edEmployeeCacheModel.home = null;
		}

		edEmployeeCacheModel.homePhone = getHomePhone();

		String homePhone = edEmployeeCacheModel.homePhone;

		if ((homePhone != null) && (homePhone.length() == 0)) {
			edEmployeeCacheModel.homePhone = null;
		}

		edEmployeeCacheModel.workPhone = getWorkPhone();

		String workPhone = edEmployeeCacheModel.workPhone;

		if ((workPhone != null) && (workPhone.length() == 0)) {
			edEmployeeCacheModel.workPhone = null;
		}

		edEmployeeCacheModel.mobilePhone = getMobilePhone();

		String mobilePhone = edEmployeeCacheModel.mobilePhone;

		if ((mobilePhone != null) && (mobilePhone.length() == 0)) {
			edEmployeeCacheModel.mobilePhone = null;
		}

		edEmployeeCacheModel.email = getEmail();

		String email = edEmployeeCacheModel.email;

		if ((email != null) && (email.length() == 0)) {
			edEmployeeCacheModel.email = null;
		}

		edEmployeeCacheModel.departmentId = getDepartmentId();

		edEmployeeCacheModel.majorLevel = getMajorLevel();

		String majorLevel = edEmployeeCacheModel.majorLevel;

		if ((majorLevel != null) && (majorLevel.length() == 0)) {
			edEmployeeCacheModel.majorLevel = null;
		}

		edEmployeeCacheModel.philosophism = getPhilosophism();

		String philosophism = edEmployeeCacheModel.philosophism;

		if ((philosophism != null) && (philosophism.length() == 0)) {
			edEmployeeCacheModel.philosophism = null;
		}

		edEmployeeCacheModel.foreignLanguage = getForeignLanguage();

		String foreignLanguage = edEmployeeCacheModel.foreignLanguage;

		if ((foreignLanguage != null) && (foreignLanguage.length() == 0)) {
			edEmployeeCacheModel.foreignLanguage = null;
		}

		Date joinDate = getJoinDate();

		if (joinDate != null) {
			edEmployeeCacheModel.joinDate = joinDate.getTime();
		}
		else {
			edEmployeeCacheModel.joinDate = Long.MIN_VALUE;
		}

		edEmployeeCacheModel.image = getImage();

		String image = edEmployeeCacheModel.image;

		if ((image != null) && (image.length() == 0)) {
			edEmployeeCacheModel.image = null;
		}

		edEmployeeCacheModel.isShowTree = getIsShowTree();

		edEmployeeCacheModel.otherInfo = getOtherInfo();

		String otherInfo = edEmployeeCacheModel.otherInfo;

		if ((otherInfo != null) && (otherInfo.length() == 0)) {
			edEmployeeCacheModel.otherInfo = null;
		}

		edEmployeeCacheModel.companyId = getCompanyId();

		edEmployeeCacheModel.groupId = getGroupId();

		edEmployeeCacheModel.userId = getUserId();

		edEmployeeCacheModel.languageId = getLanguageId();

		String languageId = edEmployeeCacheModel.languageId;

		if ((languageId != null) && (languageId.length() == 0)) {
			edEmployeeCacheModel.languageId = null;
		}

		edEmployeeCacheModel.displayOrder = getDisplayOrder();

		edEmployeeCacheModel.sex = getSex();

		String sex = edEmployeeCacheModel.sex;

		if ((sex != null) && (sex.length() == 0)) {
			edEmployeeCacheModel.sex = null;
		}

		edEmployeeCacheModel.status = getStatus();

		edEmployeeCacheModel.show = getShow();

		String show = edEmployeeCacheModel.show;

		if ((show != null) && (show.length() == 0)) {
			edEmployeeCacheModel.show = null;
		}

		return edEmployeeCacheModel;
	}

	@Override
	public String toString() {
		StringBundler sb = new StringBundler(63);

		sb.append("{uuid=");
		sb.append(getUuid());
		sb.append(", id=");
		sb.append(getId());
		sb.append(", createdDate=");
		sb.append(getCreatedDate());
		sb.append(", modifiedDate=");
		sb.append(getModifiedDate());
		sb.append(", title=");
		sb.append(getTitle());
		sb.append(", name=");
		sb.append(getName());
		sb.append(", birthday=");
		sb.append(getBirthday());
		sb.append(", homeSide=");
		sb.append(getHomeSide());
		sb.append(", family=");
		sb.append(getFamily());
		sb.append(", race=");
		sb.append(getRace());
		sb.append(", home=");
		sb.append(getHome());
		sb.append(", homePhone=");
		sb.append(getHomePhone());
		sb.append(", workPhone=");
		sb.append(getWorkPhone());
		sb.append(", mobilePhone=");
		sb.append(getMobilePhone());
		sb.append(", email=");
		sb.append(getEmail());
		sb.append(", departmentId=");
		sb.append(getDepartmentId());
		sb.append(", majorLevel=");
		sb.append(getMajorLevel());
		sb.append(", philosophism=");
		sb.append(getPhilosophism());
		sb.append(", foreignLanguage=");
		sb.append(getForeignLanguage());
		sb.append(", joinDate=");
		sb.append(getJoinDate());
		sb.append(", image=");
		sb.append(getImage());
		sb.append(", isShowTree=");
		sb.append(getIsShowTree());
		sb.append(", otherInfo=");
		sb.append(getOtherInfo());
		sb.append(", companyId=");
		sb.append(getCompanyId());
		sb.append(", groupId=");
		sb.append(getGroupId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", languageId=");
		sb.append(getLanguageId());
		sb.append(", displayOrder=");
		sb.append(getDisplayOrder());
		sb.append(", sex=");
		sb.append(getSex());
		sb.append(", status=");
		sb.append(getStatus());
		sb.append(", show=");
		sb.append(getShow());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(97);

		sb.append("<model><model-name>");
		sb.append("com.vportal.portlet.edirectory.model.EDEmployee");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>uuid</column-name><column-value><![CDATA[");
		sb.append(getUuid());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>id</column-name><column-value><![CDATA[");
		sb.append(getId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>createdDate</column-name><column-value><![CDATA[");
		sb.append(getCreatedDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
		sb.append(getModifiedDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>title</column-name><column-value><![CDATA[");
		sb.append(getTitle());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>name</column-name><column-value><![CDATA[");
		sb.append(getName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>birthday</column-name><column-value><![CDATA[");
		sb.append(getBirthday());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>homeSide</column-name><column-value><![CDATA[");
		sb.append(getHomeSide());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>family</column-name><column-value><![CDATA[");
		sb.append(getFamily());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>race</column-name><column-value><![CDATA[");
		sb.append(getRace());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>home</column-name><column-value><![CDATA[");
		sb.append(getHome());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>homePhone</column-name><column-value><![CDATA[");
		sb.append(getHomePhone());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>workPhone</column-name><column-value><![CDATA[");
		sb.append(getWorkPhone());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>mobilePhone</column-name><column-value><![CDATA[");
		sb.append(getMobilePhone());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>email</column-name><column-value><![CDATA[");
		sb.append(getEmail());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>departmentId</column-name><column-value><![CDATA[");
		sb.append(getDepartmentId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>majorLevel</column-name><column-value><![CDATA[");
		sb.append(getMajorLevel());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>philosophism</column-name><column-value><![CDATA[");
		sb.append(getPhilosophism());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>foreignLanguage</column-name><column-value><![CDATA[");
		sb.append(getForeignLanguage());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>joinDate</column-name><column-value><![CDATA[");
		sb.append(getJoinDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>image</column-name><column-value><![CDATA[");
		sb.append(getImage());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>isShowTree</column-name><column-value><![CDATA[");
		sb.append(getIsShowTree());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>otherInfo</column-name><column-value><![CDATA[");
		sb.append(getOtherInfo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>companyId</column-name><column-value><![CDATA[");
		sb.append(getCompanyId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>groupId</column-name><column-value><![CDATA[");
		sb.append(getGroupId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>languageId</column-name><column-value><![CDATA[");
		sb.append(getLanguageId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>displayOrder</column-name><column-value><![CDATA[");
		sb.append(getDisplayOrder());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>sex</column-name><column-value><![CDATA[");
		sb.append(getSex());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>status</column-name><column-value><![CDATA[");
		sb.append(getStatus());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>show</column-name><column-value><![CDATA[");
		sb.append(getShow());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private static ClassLoader _classLoader = EDEmployee.class.getClassLoader();
	private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
			EDEmployee.class
		};
	private String _uuid;
	private String _originalUuid;
	private long _id;
	private long _originalId;
	private boolean _setOriginalId;
	private Date _createdDate;
	private Date _modifiedDate;
	private String _title;
	private String _name;
	private Date _birthday;
	private String _homeSide;
	private String _family;
	private String _race;
	private String _home;
	private String _homePhone;
	private String _workPhone;
	private String _mobilePhone;
	private String _email;
	private long _departmentId;
	private long _originalDepartmentId;
	private boolean _setOriginalDepartmentId;
	private String _majorLevel;
	private String _philosophism;
	private String _foreignLanguage;
	private Date _joinDate;
	private String _image;
	private boolean _isShowTree;
	private boolean _originalIsShowTree;
	private boolean _setOriginalIsShowTree;
	private String _otherInfo;
	private long _companyId;
	private long _groupId;
	private long _originalGroupId;
	private boolean _setOriginalGroupId;
	private long _userId;
	private String _userUuid;
	private String _languageId;
	private String _originalLanguageId;
	private long _displayOrder;
	private String _sex;
	private long _status;
	private long _originalStatus;
	private boolean _setOriginalStatus;
	private String _show;
	private transient ExpandoBridge _expandoBridge;
	private long _columnBitmask;
	private EDEmployee _escapedModelProxy;
}